package com.hsoft.zhxy.common.base;

import com.hsoft.zhxy.common.util.HttpRequestLocal;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * service基类
 */
@Log4j2
public class BaseService {

    @Autowired
    private HttpRequestLocal httpRequestLocal;

    /**
     * 获取当前会话中的用户ID
     */
    public String getYhid(){
        return (String) httpRequestLocal.getRequestValue("httpRequestLocal_yhid");
    }

    /**
     * 获取当前会话中的用户姓名
     */
    public String getYhxm(){
        return (String) httpRequestLocal.getRequestValue("httpRequestLocal_yhxm");
    }

}
